package lucius.work.exception;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.WebRequest;

@ControllerAdvice
public class HandlerExcep {
	/**
	 * 全局处理Exception 错误的情况下返回500
	 * 
	 * @param ex
	 * @param req
	 * @return
	 */
	@ExceptionHandler(value = { Exception.class })
	public ResponseEntity<Object> handleOtherExceptions(final Exception ex, final WebRequest req) {
		/*TResult tResult = new TResult();
		tResult.setStatus(CodeType.V_500);
		tResult.setErrorMessage(ex.getMessage());
		return new ResponseEntity<Object>(tResult, HttpStatus.OK);*/
		return null;
	}
}
